package com.sooncode.project.focusservice.service;

import com.sooncode.project.core.finder.Finder;
import com.sooncode.project.focusservice.model.CourseLatitude;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class CourseLatitudeService {
    public boolean add(Map map){
        CourseLatitude courseLatitude=new CourseLatitude();
        courseLatitude.add(map);
        return true;
    }

    public boolean modify(String id,Map map){
        CourseLatitude courseLatitude=getById(id);
        courseLatitude.modify(map);
        return true;
    }
    public boolean delete(String id){
        CourseLatitude courseLatitude=getById(id);
        courseLatitude.delete();
        return true;
    }
    public CourseLatitude getById(String id){
        return new Finder<>(CourseLatitude.class).byId(id);
    }
    public List<CourseLatitude> getList(){
        return new Finder<>(CourseLatitude.class).list();
    }
}
